<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><?=$name;?></title>
    <style>
        *{
            color: white;
        }
        table{
            border-collapse:collapse;
            table-layout:fixed;
            border-radius:5px;
            overflow:hidden;
            margin: 10px auto;
            border:2px solid #70aefb ;
            background-color: #1f5a9c;
            color: #fafafb;
        }
        table td,th{
            /* padding: 5px;
            width: 33%; */
            text-align: center;
            border:1px solid #70aefb ;
            vertical-align:middle;
            /* font-size: 15px; */
            width: 7rem;
        }
        a{
            color: red;
        }
        #edit div{
            margin-bottom: 10%;
        }
        label{
            width: 7rem;
        }
        .color1{
            background-color: red;
        }
        .color2{
            background-color: #eb4545;
        }
        .color3{
            background-color: #df9292;
        }
    </style>
</head>
<body style="background-image: url('<?=!empty($ImgName)?$ImgName:null;?>.jpg');background-repeat: no-repeat;">
<h1 style="text-align: center;margin-top: 6rem;"><?=$name;?></h1>
<table>
    <thead>
    <tr>
        <th>排名</th>
        <th>名称</th>
        <th>分数</th>
    </tr>
    </thead>
    <tbody>
    <?php foreach($data as $key => $val):?>
    <tr class="color<?=$key+1;?>">
        <td><?=$key+1;?></td>
        <td><?=$val['name'];?></td>
        <td><?=$val['score'];?></td>
    </tr>
    <?php endforeach;?>
    </tbody>
</table>
</body>
</html>